#ifndef BYTEARRAY_H
#define BYTEARRAY_H
#include <vector>
#include <zxing/common/Counted.h>

namespace newcode {
using namespace std;
using namespace zxing;

class ByteMatrix: public Counted
{
private:
    vector<vector<unsigned char> > data;
    int x;
    int y;

public:
    ByteMatrix(int x, int y);
    unsigned char& operator()(int x, int y);
    int getX() const;
    int getY() const;
    unsigned char* getRow(int index) const;
    void setRow(unsigned char* bytes, int index);
    operator string () const;

    friend ostream& operator<<(ostream &out, const ByteMatrix &bm);
};

}
#endif // BYTEARRAY_H
